package com.jiaai.cloud.live.service.impl;

import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.jiaai.cloud.base.page.CustomPage;
import com.jiaai.cloud.live.entity.TAnchorTask;
import com.jiaai.cloud.live.mapper.TAnchorTaskMapper;
import com.jiaai.cloud.live.service.ITAnchorTaskService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.jiaai.cloud.live.vo.TaskVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 主播任务列表 服务实现类
 * </p>
 *
 * @author 佳爱网络科技
 * @since 2017-08-17
 */
@Service
public class TAnchorTaskServiceImpl extends ServiceImpl<TAnchorTaskMapper, TAnchorTask> implements ITAnchorTaskService {

    @Override
    public List<TaskVO> findTaskByAnchorId(String anchorId) {
        return baseMapper.findTaskByAnchorId(anchorId);
    }
    /**
     * 查找主播任务
     * @param
     * @return
     */
    @Override
    public CustomPage<TAnchorTask> findTaskFully(Page page, @Param("ew") Wrapper wrapper) {
        page.setRecords(baseMapper.findTaskFully(page, wrapper));
        return new CustomPage(page);
    }

}
